<?php 
class Home extends Controller {

	function Home()
	{
		parent::Controller();
		$this->load->library('layout', 'layouts/layout_admin');	
		$this->load->library('session');
	}
	
	function index()
	{
		$this->verifyLogin('admin/home/index');
		$this->layout->view('admin/home/index');
	}
	
	function verifyLogin($action){
		if (!$this->session->userdata('username')) {
			redirect("admin/login/index/".$action);
		}
	}
}
?>